<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/topnav.css">
</head>
<body>
<div class="home" style="padding: 1% 1% 1% 1%">
    <a href="/user/get-all-consumer">返回首页</a>
</div>
<div class="back">
    <div class="a">
        <h1>发表博客</h1>
    </div>
    <div class="neirong">
        <div class="b">
            <table border="0">
            <c:if test="${empty sessionScope.get(blogUuid)}">
                <form action="/blog/add-root-highlight-blog" method="post">
                    <tr>
                        <td align="left">标签：</td>
                        <td>
                            <c:if test="${not empty allTag}">
                                <select name="tagUuid">
                                    <option>请选择</option>
                                    <c:forEach items="${allTag}" var="a">
                                        <option value="${a.tagUuid}">${a.tagName}</option>
                                    </c:forEach>
                                </select>
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">标题：</td>
                        <td>
                            <textarea name="blogTitle" rows="1" cols="50" placeholder="标题！"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">内容：</td>
                        <td>
                            <textarea name="blogContent" rows="3" cols="50" placeholder="内容！"></textarea>
                        </td>
                    </tr>

                    <tr>
                        <td align="left">作者：</td>
                        <td>
                            <input class="kuang" type="text" name="blogAuthor"
                                   value="${sessionScope.consumer.responseObject.consumerUuid}" hidden>
                            <input class="kuang" type="text"
                                   value="${sessionScope.consumer.responseObject.consumerName}">
                        </td>
                    </tr>

                    <tr align="center">
                        <td colspan="2">
                            <input type="submit" value="请提交" class="anniu"> <input
                                type="reset" value="取消" class="anniu">
                        </td>
                    </tr>
                </form>
            </c:if>
                <tr>
                    <td align="left">文件：</td>

                    <td align="center">
                        <form method="post" enctype="multipart/form-data"
                              action="/document/add-document">
                            <a href="${sessionScope.get("blogUuid")}">${sessionScope.get("blogUuid")}
                            </a>
                            <input type="file" name="myFile" align="center"/>
                            <input type="submit" value="文件上传" align="center"/>
                        </form>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>

</body>
<style>
    .home a {
        font-size: 30px;
        text-decoration: none;
    }

    div.back {
        padding: 5% 10% 10% 30%;
        width: 500px;
        margin: 35px 60px;
    }

    div.a {
        border-style: solid;
        border-color: #ffffff;
        border-radius: 15px;
    }

    body {
        background-image: url("/static/img/kb.jpg");
    }

    table {
        width: 490px;
        /*background-color: FFAEB9;*/
        color: #FFFFFF;
    }

    td {
        padding: 5px;
        font-weight: bold;
    }

    h1 {
        text-align: center;
        color: #FFFFFF;
    }

    .kuang {
        border-radius: 15px;
        padding-top: 6px;
        padding-bottom: 6px;
        padding-left: 10px;
        padding-right: 10px;
        border: gray solid 1px;
        background-color: #F5FFFA;
    }

    select, textarea {
        border-radius: 7px;
        padding-top: 6px;
        padding-bottom: 6px;
        padding-left: 10px;
        padding-right: 10px;
        border: gray solid 1px;
        background-color: #F5FFFA;
    }

    input[type="file"] {
        border-radius: 7px;
        padding-top: 6px;
        padding-bottom: 6px;
        padding-left: 10px;
        padding-right: 10px;
        border: gray solid 1px;
        background-color: #F5FFFA;
    }

    .anniu {
        border-radius: 7px;
        padding: 6px 30px;
        background-color: #F5FFFA;
        font-size: 14px;
        font-weight: bold;
    }

    .neirong {
        margin-top: 10px;
        border-style: double;
        border-color: #ffffff;
        border-radius: 15px;
        border-width: medium;
        padding-bottom: 9px;
    }

    input[type="submit"] {
    }
</style>
</html>
